from flask import Flask, request

# 创建Flask对象
app = Flask('HelloFlask')


@app.route('/hello', methods=['GET', 'POST'])
def hello():

    if request.method == 'GET':
        print('GET')
    elif request.method == 'POST':
        print('POST')
    print("Hello")
    return '''
    <h1>创建Flask对象</h1>
    '''


app.run('localhost', 8111)
